﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Doo.WebUI
{
    /// <summary>
    /// 控件容器
    /// </summary>
    public class WidgetContainer : WidgetControl
    {
        const string CssResourceName = "Doo.WebUI.WidgetControls.PageEditor.WidgetContainer.css";

        public static string DefaultCSS = "Doo-Container";

        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            ResourceManger.RegisterCSS(this.GetType(), CssResourceName);
        }

        protected override void Render(HtmlTextWriter writer)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Class, DefaultCSS);
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            base.RenderChildren(writer);
            writer.RenderEndTag();
        }
    }
}
